home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 21
/
Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso
/
Aminet
/
util
/
dtype
/
DT_Descriptors.lha
/
DT-Descriptors
/
Hook_Source
/
ArcCheck.c
next >
Wrap
C/C++ Source or Header
|
1997-07-02
|
636b
|
32 lines
/*
* ArcCheck.c by TetiSoft
*
* Hook Check Func for cli.datatype to check for ARC Archive
* Tests if file starts with 0x1A01 or 0x1A02 or ... or 0x1A09
*/
#include <datatypes/datatypes.h>
BOOL __asm __interrupt DTHook (register __a0 struct DTHookContext * dthc)
{
BOOL IsARC = FALSE;
/* Make sure we have a buffer */
if (dthc->dthc_Buffer && dthc->dthc_BufferLength>=2)
{
UWORD magic=*(UWORD *)dthc->dthc_Buffer;
if(magic==0x1A01
||magic==0x1A02
||magic==0x1A03
||magic==0x1A04
||magic==0x1A05
||magic==0x1A06
||magic==0x1A07
||magic==0x1A08
||magic==0x1A09)
IsARC=TRUE;
}
return(IsARC);
}